//
//  EditLightLombinationsCell.m
//  CoachsBook
//
//  Created by MaBookPro on 2022/8/25.
//

#import "EditLightLombinationsCell.h"

@implementation EditLightLombinationsCell


-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self creatcelllist];
    }
    return self;
}

-(void)creatcelllist{
    
    UILabel *typeLab = [[UILabel alloc]initWithFrame:CGRectMake(15,  15, 120, 20)];
    typeLab.text = @"开始";
    typeLab.textColor = rgba(51, 51, 51, 1);
    typeLab.textAlignment = 0;
    typeLab.font = [UIFont boldSystemFontOfSize:16];
    [self.contentView addSubview:typeLab];
    
    UILabel *disLab = [[UILabel alloc]initWithFrame:CGRectMake(15,  typeLab.frame.size.height + typeLab.frame.origin.y+10, APPwidth-30, [LongHelper textHeight:@"下面将进行模拟夜间行驶场景灯光使用的考试，请按语音指令在5秒内做出相应的灯光操作:请开启前照灯。" WithUIFont:kPingFangRegular(14) AndWidth:APPwidth-30])];
    disLab.text = @"下面将进行模拟夜间行驶场景灯光使用的考试，请按语音指令在5秒内做出相应的灯光操作:请开启前照灯。";
    disLab.textColor = rgba(51, 51, 51, 1);
    disLab.textAlignment = 0;
    disLab.numberOfLines = 0;
    disLab.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:disLab];
    
    
    NSArray *btnarr = @[@"删除",@"更换",@"下方插入"];
    for (int i = 0; i < btnarr.count; i++) {
        UIButton *bmBtn = [[UIButton alloc]initWithFrame:CGRectMake(APPwidth/3+i+15+i*80, disLab.height+disLab.y+10, 80, 25)];
        [bmBtn setTitle:btnarr[i] forState:0];
        bmBtn.contentHorizontalAlignment = 0;
        bmBtn.titleLabel.font = [UIFont systemFontOfSize:13];
        bmBtn.layer.cornerRadius = 25/2;
        [self addSubview:bmBtn];
        
        if ( i == 0) {
            [bmBtn setBackgroundColor:rgba(255, 241, 241, 1)];
            [bmBtn setTitleColor:rgba(255, 41, 41, 1) forState:0];

        }else if (i == 1){
            
            [bmBtn setTitleColor:rgba(38, 194, 126, 1) forState:0];
            [bmBtn setBackgroundColor:rgba(234, 249, 242, 1)];


        }else{
            [bmBtn setTitleColor:rgba(38, 194, 126, 1) forState:0];
            [bmBtn setBackgroundColor:rgba(234, 249, 242, 1)];

        }
        
    }
    UIView *line = [[UIView alloc]initWithFrame:CGRectMake(15, 0, APPwidth-30, 1)];
    line.backgroundColor = rgba(245, 245, 250, 1);
    [self addSubview:line];
    
}















- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
